package com.gp.learn.ssm.base.system.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import io.swagger.annotations.ApiOperation;
import com.gp.learn.ssm.base.core.mybaits.model.*;

import org.springframework.web.bind.annotation.RestController;
import com.gp.learn.ssm.base.system.entity.AppAccount;
import com.gp.learn.ssm.base.system.service.AppAccountService;
import com.gp.learn.ssm.base.core.mybaits.base.controller.BaseController;

/**
 * app用户-登录账号 前端控制器
 * @author gp
 * @since 2020-07-24
 */
@RestController
@RequestMapping("/app-account")
public class AppAccountController extends BaseController <AppAccountService, AppAccount> {

        @ApiOperation(value = "系统用户-登录账号-分页列表", notes = "系统用户-登录账号分页列表")
        @GetMapping(value = "page")
        public ResultBody pageList(PageModel pageModel) {
            return bizService.pageList(pageModel);
        }

        @ApiOperation(value = "系统用户-登录账号-列表", notes = "系统用户-登录账号列表")
        @GetMapping(value = "list")
        public ResultBody list(ListModel listModel) {
            return bizService.listEntityMap(listModel);
        }

        @ApiOperation(value = "系统用户-登录账号-添加", notes = "添加系统用户-登录账号")
        @PostMapping(value = "save")
        public ResultBody save(SaveModel saveModel) {
            return bizService.add(saveModel);
        }

        @ApiOperation(value = "系统用户-登录账号-更新", notes = "更新系统用户-登录账号")
        @PostMapping(value = "update")
        public ResultBody update(UpdateModel updateModel) {
            return bizService.edit(updateModel);
        }

        @ApiOperation(value = "系统用户-登录账号-删除", notes = "删除系统用户-登录账号")
        @PostMapping(value = "delete")
        public ResultBody delete(DeleteModel deleteModel) {
            return bizService.delete(deleteModel);
        }


        @ApiOperation(value = "系统用户-登录账号-详情", notes = "系统用户-登录账号详情")
        @GetMapping(value = "get")
        public ResultBody get(GetModel getModel) {
            return bizService.get(getModel);
        }
}

